page_alloc: clear nr_bootmem_regions in end_boot_allocator()
authorJan Beulich <jbeulich@suse.com>
Tue, 7 Feb 2017 13:32:05 +0000 (14:32 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Feb 2017 13:32:05 +0000 (14:32 +0100)
commit5fcf1c2516d253011b7c1001fe6a82e6c293f708
treea89994cbd1917f2240675e2e1c64f9cb44e8d7ea
parent6bb5d3855b2392cf6b05c242e01812eac147a3ca
page_alloc: clear nr_bootmem_regions in end_boot_allocator()

... to make alloc_boot_pages() fail for late callers. Don't rely on
reaching the BOOT_BUG_ON(1) near the end of that function though, but
instead make this situation easier to distinguish from actual
allocation failures by adding an explicit check.

While there, make the iteration variable unsigned and guard against
underflow.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/page_alloc.c